import Layout from "@/layout/index.vue";
import type { RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/social",
    name: "social",
    component: () => import("@/views/social-callback/index.vue")
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录"
    }
  },
  {
    path: "/",
    name: "cbe",
    component: Layout,
    redirect: { name: "Home" },
    children: [
      {
        path: "home",
        name: "Home",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "首页"
        }
      },
      {
        path: "custom",
        name: "Custom",
        component: () => import("@/views/home/custom/index.vue"),
        meta: {
          title: "客户信息"
        }
      },
      {
        path: "customDetail",
        name: "CustomDetail",
        component: () => import("@/views/home/custom/customDetail.vue"),
        meta: {
          title: "客户信息"
        }
      },
      {
        path: "recordDetail",
        name: "RecordDetail",
        component: () => import("@/views/home/recordDetail/index.vue"),
        meta: {
          title: "拜访记录"
        }
      },
      {
        path: "visitRecords",
        name: "VisitRecords",
        component: () => import("@/views/visitRecords/index.vue"),
        meta: {
          title: "拜访记录"
        }
      },
      {
        path: "industryReport",
        name: "IndustryReport",
        component: () => import("@/views/industryReport/index.vue"),
        meta: {
          title: "行业报告"
        }
      },
      {
        path: "industryReportDetail",
        name: "IndustryReportDetail",
        component: () => import("@/views/industryReport/industryDetail.vue"),
        meta: {
          title: "行业报告详情"
        }
      },
      {
        path: "sharedCalendar",
        name: "SharedCalendar",
        component: () => import("@/views/sharedCalendar/index.vue"),
        meta: {
          title: "共享日历"
        }
      },
      {
        path: "sharedCalendarEdit",
        name: "SharedCalendarEdit",
        component: () => import("@/views/sharedCalendar/addOrEdit.vue"),
        meta: {
          title: "共享日历发布"
        }
      }
    ]
  }
];

export default routes;
